package com.aidex.biz.smy.utils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.tomcat.util.codec.binary.Base64;
public class Base64Utils {
    //编码
    public static String encode(final byte[] Encp) {
        if (ObjectUtils.isEmpty(Encp)) {
            return null;
        }
        return Base64.encodeBase64String(Encp);//编码
    }
    //解码
    public static byte[] decode(final String Decp) {
        if (ObjectUtils.isEmpty(Decp)) {
            return null;
        }
        return Base64.decodeBase64(Decp);//解码
    }

}
